mod forex_loader;
mod forex_repository;
use serde::Deserialize;
use serde::Serialize;
use std::collections::HashMap;
type Currency<'a> = &'a str;
#[derive(Serialize, Deserialize, Debug)]
pub struct Forex {
    base: String,
    date: String,
    timestamp: u64,
    rates: HashMap<String, f64>,
}
pub async fn get_forex(base_currency: Currency<'_>) -> anyhow::Result<Forex> {
    forex_loader::load_forex(base_currency).await
}
pub fn get_exchange(base_currency: Currency, target_currency: Currency, date: &str) -> Option<f64> {
    unimplemented!()
}

pub fn get_exchange_history(
    base_currency: Currency,
    target_currency: Currency,
) -> Option<Vec<f64>> {
    unimplemented!()
}
